Skip to content

Run GitHub Issue and PTY stats Resource providers on WASIp2 - #411

Merged
schickling-assistant merged 4 commits into
schickling-assistant/2026-09-01-wasip2-resource-executorfrom
schickling-assistant/2026-09-01-wasip2-resource-providers
Sep 1, 2026
Merged

Run GitHub Issue and PTY stats Resource providers on WASIp2#411
schickling-assistant merged 4 commits into
schickling-assistant/2026-09-01-wasip2-resource-executorfrom
schickling-assistant/2026-09-01-wasip2-resource-providers

Conversation

@schickling-assistant

@schickling-assistant schickling-assistant commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Problem

st2 has Resource observation demand and publication semantics, but no production provider components. Native provider processes would leave cancellation, capability scope, and publication fencing inconsistent.

Goal

Run GitHub Issue and PTY stats observations end to end as typed WASIp2 components, while preserving demand coalescing, catch-up delivery, generation fencing, health, and scope isolation.

Decisions

  • Catalogs declare one component artifact and one tagged capability: github-issue or pty-stats.
  • Observation jobs run outside the supervisor mailbox. Refresh, deactivate, and shutdown can cancel in flight work and fence late completion.
  • GitHub derives only the declared public issue endpoint, rejects private/special DNS results, disables redirects, bounds headers/body/decompression, and caches exact-issue ETag plus body state. No token enters the guest.
  • PTY exposes only fixed pty stats --json [session], clears environment, fixes cwd, bounds output, and owns process-group kill plus reap without a recyclable-pgid window.
  • Component bytes participate in catalog generation identity through one bounded, no-follow snapshot.

Verification

  • nix flake check --print-build-logs passed locally after one unrelated lock/socket test flake passed in isolated retry.
  • Provider gate: 656 root library tests, 4 supervisor E2Es, 1 local component E2E, and 8 provider tests passed.
  • Executor gate: 5 library tests and 13 executor tests passed.
  • Both packaged WASIp2 components built.
  • The explicit anonymous GitHub host smoke and packaged GitHub component smoke passed.
  • The real packaged PTY smoke and packaged PTY component E2E passed.

The E2Es cover publication/unchanged/failure, no partial commit, leading/trailing coalescing, future-generation queueing, mid-flight cancellation to StaleGeneration, durable disconnected receipts, catch-up replay-once, topic filtering, cross-catalog isolation, restart recovery, degraded/ready health, capability denial, and the 256-request admission boundary.

Complexity

Two small domain capability modules and guest components sit behind one universal executor. The asynchronous job boundary is required so one slow provider cannot block all bindings or supervisor control operations.

Concerns

GitHub support is anonymous public-read only. Private repositories and authentication are intentionally absent.

Friction & bottlenecks

Full Nix validation took several minutes and repeatedly triggered shared auto-GC. One pre-existing parallel socket/owner-lock test failed once and passed unchanged in isolated retry.

Follow-ups

  • WASIp3 remains out of scope until its component/runtime contracts stabilize.
  • Private GitHub access would require a separate credential and trust-boundary design.

References

Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.2cshu64q
session dev3.2cshu64q
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.9
agent_runtime OMP 18.0.9
tooling_profile dotfiles@b607597

@schickling-assistant schickling-assistant changed the title feat(resource): add WASIp2 providers Run GitHub Issue and PTY stats Resource providers on WASIp2 Sep 1, 2026
@schickling-assistant
schickling-assistant marked this pull request as ready for review September 1, 2026 15:45
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

@codex please review this PR.

Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.2cshu64q
session dev3.2cshu64q
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.9
agent_runtime OMP 18.0.9
tooling_profile dotfiles@b607597

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T20:29:27.071846Z 26e6821 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3118515939

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/st2-resource-providers/src/pty_stats.rs Outdated
Comment thread src/resource_profile_supervisor.rs Outdated
agent-identity: dev3.direct.omp.2cshu64q
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.9
agent-runtime: OMP 18.0.9
tooling-profile: dotfiles@b607597
agent-identity: dev3.direct.omp.2cshu64q
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.9
agent-runtime: OMP 18.0.9
tooling-profile: dotfiles@b607597
agent-identity: dev3.direct.omp.2cshu64q
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.9
agent-runtime: OMP 18.0.9
tooling-profile: dotfiles@b607597
agent-identity: dev3.direct.omp.2cshu64q
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.0.9
agent-runtime: OMP 18.0.9
tooling-profile: dotfiles@b607597
@schickling-assistant
schickling-assistant force-pushed the schickling-assistant/2026-09-01-wasip2-resource-providers branch from 3118515 to 26e6821 Compare September 1, 2026 20:17
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

@codex review

Posted on behalf of @schickling
field value
agent_identity dev3.direct.omp.2cshu64q
session dev3.2cshu64q
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.0.9
agent_runtime OMP 18.0.9
tooling_profile dotfiles@b607597

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 26e6821fca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Ok(provider_api::ProviderDescriptor {
capabilities: vec![provider_api::SchedulingCapability::Demand],
selector_schema_json: SELECTOR_SCHEMA.into(),
default_selector_json: "{}".into(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Provide a default that satisfies the selector schema

When a caller omits a selector and uses this advertised default, {} is missing the schema-required owner, repo, and number fields, so observe immediately returns Failed("invalid GitHub issue selector"). Make the default valid or remove the claim that this provider supplies a usable default.

Useful? React with 👍 / 👎.

.all(|topic| profile_topics.contains(topic.as_str())),
"provider descriptor declares a topic outside the profile contract"
);
Ok(())

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce the provider selector contract at admission

When a resolver profile has a broader or different selector schema than its component, desired_bindings validates only against the resolver descriptor and this function still accepts the provider because it never compares or applies provider.selector_schema or provider.default_selector. Such selectors are admitted as healthy bindings but every demand can then fail inside the guest parser; validate compatibility with the provider's selector contract before returning success.

Useful? React with 👍 / 👎.

@schickling-assistant
schickling-assistant merged commit 124eb5c into main Sep 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant